//表单验证
    $.validator.setDefaults({
        submitHandler: function() {
        alert("提交事件!");
        }
    });
    $(function(){
        //验证规则
        $(".shop-form-box").validate({
            rules:{
                UserName:{
                    required:true
                },
                Password:{
                    required:true,
                    minlength: 6
                },
                ConfirmPassword: {
                    required: true,
                    minlength: 6,
                    equalTo: "#password"
                },
                code:{
                    required: true,
                    minlength:4,
                    maxlength:4
                }
            },
            messages:{
                UserName:"请输入用户名",
                Password:{
                    required:"请输入用户密码",
                    minlength:"用户密码最小六位"
                },
                ConfirmPassword:{
                    required: "请确认用户密码",
                    minlength: "用户密码最小六位",
                    equalTo: "两次密码不一致"
                },
                code:{
                    required: "请输入验证码",
                    minlength:"验证码为四位",
                    maxlength:"验证码为四位"
                }
            }
        });
    });